Chapter 5 - Option Management
This chapter explains the use of options, values associated with an endpoint provider, which you can change to fine-tune or customize the data-transfer service offered by the endpoint. In general, the use of options decreases portability and makes transport independence much more difficult, if not impossible, to achieve. Therefore, it is important to note that default option values are provided for every type of endpoint and that you can write applications that never need to specify any options. You need to read this chapter if
This chapter describes general options that can be specified by any protocol that supports them, explains the rules followed in the negotiation process, and explains how you construct an options buffer and how you get and set option values. It also describes functions that you can use
- you need to use services that must be specified using options
For example, you are using a transaction-based endpoint and need to be able to send expedited data in order to forward an attention message.
- it is critical to your application that you fine-tune the data-transfer services offered by a protocol and you can only do this by using options
For example, you need to manipulate the size of internal send and receive buffers to eliminate data backlog or buffer overflow problems.
- you need to create a debugging version of the application through the use of options
To understand this chapter, you should be familiar with endpoint providers and the endpoint functions used to transfer data. These topics are discussed in the "Endpoints" chapter in this book. For specific information about the options that are supported for a protocol implementation, you need to consult the documentation provided for that protocol.
- to construct buffers containing option information
- to locate options in these buffers
- to parse buffers containing option information
Chapter Contents
- About Options and Option Negotiation
- Explicit Use of Options and Portability of Code
- Types of Options
- The Format of Option Information
- XTI-Level Options and General Options
- Using Options
- Determining Which Function to Use to Negotiate Options
- Negotiating Options
- Negotiating Multiple Options
- Initiating an Option Negotiation
- Privileged or Read-Only Options
- Error Conditions
- Obtaining the Maximum Size of an Options Buffer
- Setting Option Values
- Specifying Option Values
- Setting Default Values
- Allowing the Endpoint Provider to Select an Option Value
- Retrieving Option Values
- Obtaining Current and Default Values
- Retrieving Values for Connection-Oriented Endpoints
- Retrieving Values for Connectionless Transactionless Endpoints
- Retrieving Values for Connectionless Transaction-Based Endpoints
- Parsing an Options Buffer
- Verifying Option Values
- Option Management Reference
- Constants and Data Types
- XTI-Level Options
- Generic Options
- Status Codes
- Action Flags
- The Linger Structure
- The Keepalive Structure
- The TOption Structure
- The Option Management Structure
- Functions
- Determining and Changing Function Values
- Manipulating the Format of Option Information
- Finding Options